home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
c
/
vbccm68k.lha
/
vbcc
/
doc
/
vlink.doc
< prev
next >
Wrap
Text File
|
1999-03-07
|
8KB
|
188 lines
vlink V0.6 VBCC ANSI C Compiler Reference Manual vlink V0.6
NAME
vlink - linker for multiple file formats
SYNOPSIS
vlink [-dhrstvwxMRSX] [-B linkmode] [-b targetname] [-baseoff offset]
[-F filename] [-L library-search-path] [-l library-specifier]
[-multibase] [-nostdlib] [-o filename] [-sc] [-sd] [-V version]
[-y symbol] input-files...
DESCRIPTION
vlink combines the object and archive files given on the command line
into a new object file. The output object file is either an executable
program, a shared object suitable for loading at run-time, or an
object file that can once again be processed by vlink. Object files
and archives are processed in the order given on the command line.
The file format of an input object file is determined automatically
by vlink. The default output file format is compiled in (see -v)
and may be changed by -b.
Supported file formats:
amigaos
The AmigaDos hunk format for M68k. Requires AmigaOS 2.04.
No shared objects. Small data offset: 0x7ffe. Linker
symbols: _DATA_BAS_, _DATA_LEN_, _BSS_LEN_ (PhxAss),
_LinkerDB, __BSSBAS, __BSSLEN (SASC/StormC), __DATA_BAS,
__DATA_LEN, __BSS_LEN, __RESIDENT (DICE-C). Automatic
constructor/destructor function tables: __ctors, __dtors.
amigaehf
An extension of the AmigaDOS hunk format for the PowerPC,
32-bit, big endian, as introduced by Haage&Partner GmbH. No
executables (they are in amigaos format) or shared objects.
The same linker symbols, constructors/destructors as under
amigaos are supported. Additionally, "@_name" symbols will
be created on demand (when referenced).
elf32ppcbe
ELF (executable linkable format) for PowerPC, 32-bit,
big endian. Small data offset: 0x7ff0. Linker symbols:
_SDA_BASE_ and _SDA2_BASE (EABI only). Automatic construc-
tor/destructor function tables will be placed into the
sections .ctors and .dtors.
elf32powerup
ELF PowerPC 32-bit big endian for the PowerUp turbo boards
from Phase5. Main difference to elf32ppcbe is the format
of the executable (which is a relocatable object) and a new
linker symbol, _LinkerDB, for vbccppc-compatibility.
The options are as follows:
-Bdynamic
Specifies that linking against dynamic libraries can take
place. If a library specifier of the form -lx appears on
the command line, ld searches for a library of the from
libx.so.n.m (see the -l option) according to the search
rules in effect. If such a file can not be found a tradi-
tional archive is looked for. This options can appear
anywhere on the command line and is complementary to -Bstatic.
-Bstatic
The counterpart of -Bdynamic. This option turns off dynamic
linking for all library specifiers until a -Bdynamic is once
again given. Any explicitly mentioned shared object encoun-
tered on the command line while this option is in effect is
flagged as an error.
-Bshareable
Instructs the linker to build a shared object from the object
files rather than a normal executable image.
-Bsymbolic
This option causes all symbolic references in the output to be
resolved in this link-edit session. The only remaining run-
time relocation requirements are base-relative relocations,
ie. translation with respect to the load address. Failure to
resolve any symbolic reference causes an error to be reported.
-Bforcearchive
Force all members of archives to be loaded, whether or not such
members contribute a definition to any plain object files.
Useful for making a shared library from an archive of PIC
objects without having to unpack the archive.
-b targetname
Specifies target file format for the output file. See
also "Supported file formats".
-baseoff offset
Defines section offset for base-relative relocations. The
default offset is target-dependant (e.g. 0x7ffe for amigaos
and 0x7ff0 for elf32ppcbe).
-dc Force allocation of commons even when producing relocatable
output.
-dn Same as: -Bstatic
-dy Same as: -Bdynamic
-F filename
A list of object file names is read from the specified file.
Useful, if the number of objects exceeds the length of the
command line.
-h Prints a short help text.
-L library-search-path
Add path to the list of directories to search for libraries
specified with the -l option. When a default search path
was compiled in (see -v), then it is searched last.
-l library-specifier
This option specifies a library to be considered for inclusion
in the output. If the -Bdynamic option is in effect, a shared
library of the form lib<spec>.so.m.n (where m is the major,
and n is the minor version number, respectively) is searched
for first. The library with the highest version found in the
search path is selected. If no shared library is found or
the -Bstatic option is in effect, an archive of the form
lib<spec>.a is looked for in the library search path.
For amigaos/amigaehf file formats, the libraries are called
-M Produce output about the mapping of segments of the input
files and the values assigned to symbols in the output file.
-multibase
The default behaviour of vlink is to merge all sections
which are accessed base-relative. This guarantees a single
small data section, which can be accessed through a base
register.
If this is not desired - maybe you have several base re-
gisters and small data sections - you can disable this
behavoiur by specifying -multibase.
-nostdlib
Ignore default library search path, if one was compiled in.
-o filename
Specifies the name of the output file. Defaults to "a.out".
-R If the target file format supports it, use the short
format for relocations.
-r Produce relocatable object file, suitable for another
linker pass.
-S Strip all debugger symbols from the output.
-s Strip all symbols from the output.
-sc Merge all code sections to a single code section.
-sd Merge all data and bss sections to a single data-bss section.
-t Trace the linker's file accesses.
-V version
Minimum major version of shared object to be linked.
-v Prints vlink version string, default library search path
and implemented target file formats.
-w Suppress all warning messages.
-X Discard local symbols in the input files that start with the
letter "L" or with a dot.
-x Discard all local symbols in the input files.
-y symbol
Trace the manipulations inflicted on symbol.
BUGS
Target elf32ppcbe can't generate shared objects or executables.
Target elf32powerup can't generate shared objects.
The following options are not really supported: -B, -d, -S, -X.
Option -R is untested and should be avoided.
Real debugger support (source level debugging, etc.) is still
missing for all target file formats.
Frank Wille 05-Feb-1999 frank@phoenix.owl.de